// pages/common/helps.js
var app = getApp();
Page({
  data: {
    is_empty: true
  },
  onLoad: function (options) {
    this.getHelps(options.types);
  },
  getHelps: function (types) {
    var that = this;
    wx.showLoading({ title: '数据加载中...', mask: true });
    app.func.req('index/helps', { types: types
    }, 'GET', function (res) {
      if (res.code == "success") {
        var helps = res.result;
        that.setData({
          helps: helps,
          is_empty: false
        });
      }
      wx.hideLoading();
    }, {
        'token': wx.getStorageSync('token')
      });
  }
})
